<!--
 * @description:
 * @author: cuicui
 * @Date: 2023-11-26 12:14:15
 * @LastEditTime: 2023-11-27 23:38:18
 * @LastEditors: cuicui
-->
<template>
  <div :class="wrpCls" style='width: 120px'>
    <avatar-dropdown :menu="showMenu" :current-user="currentUser" :class="prefixCls" @remove-mark-timer='removeMarkTimer' @hidden-side-menu='handleHiddenSideMenu' />
    <!-- <select-lang :class="prefixCls" /> -->
  </div>
</template>

<script>
import AvatarDropdown from './AvatarDropdown'
// import SelectLang from '@/components/SelectLang'

export default {
  name: 'RightContent',
  components: {
    AvatarDropdown
    // SelectLang
  },
  props: {
    prefixCls: {
      type: String,
      default: 'ant-pro-global-header-index-action'
    },
    isMobile: {
      type: Boolean,
      default: () => false
    },
    topMenu: {
      type: Boolean,
      required: true
    },
    theme: {
      type: String,
      required: true
    }
  },
  data () {
    return {
      showMenu: true,
      // currentUser: {}
    }
  },
  computed: {
    wrpCls () {
      return {
        'ant-pro-global-header-index-right': true,
        [`ant-pro-global-header-index-${(this.isMobile || !this.topMenu) ? 'light' : this.theme}`]: true
      }
    },
    currentUser() {
      return this.$store.state.user.info
    }
  },
  methods: {
    handleHiddenSideMenu(){
      this.$emit('hidden-side-menu')
    },
    removeMarkTimer(){
      this.$emit('remove-mark-timer')
    },
  },
  mounted () {
    // setTimeout(() => {
    //   this.currentUser = {
    //     name: 'admin'
    //   }
    // }, 1500)
  }
}
</script>
